<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/layout/commonLayout.xhtml">
	<ui:define name="content">
			Grupo:
		<h:selectOneMenu value="#{emailMB.grupo.id}"
			valueChangeListener="#{emailMB.change}">
			<f:selectItem itemLabel="Selecione..." />
			<f:selectItems value="#{emailMB.grupos}" var="grupo"
				itemLabel="#{grupo.nome}" itemValue="#{grupo.id}" />
			<f:ajax event="change" render="textArea" />
		</h:selectOneMenu>
		<h:commandButton value="Salvar" action="#{emailMB.save}">
			<f:attribute name="next" value="emailMB.pageLoad" />
			<f:attribute name="msg" value="Email(s) registrados com sucesso" />
		</h:commandButton>
		<br />
		<br />
		<h:inputTextarea id="textArea" value="#{emailMB.textArea}" />
	</ui:define>
</ui:composition>
</html>